package org.cqut.system.common.service;

import org.cqut.system.common.dto.WorkDto;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * @author XiAoXu
 * @date 2021/11/3 22:57
 * @description
 */
public interface CommonService {
    String uploadAvatar(MultipartFile file, String username);

    String sendEmail(String email);

    boolean uploadResource(MultipartFile[] file);

    void download(HttpServletResponse response, String resourceId);

    void template(HttpServletResponse response) throws Exception;

    boolean uploadWork(MultipartFile file, WorkDto workDto);

    void downloadWork(HttpServletResponse response, String recordId);

    boolean submitWork(MultipartFile file, String recordId);

    void downloadSubmit(HttpServletResponse response, String submitId);

    String pack(HttpServletResponse response, List<String> ids) throws IOException;

    void downloadSubmits(HttpServletResponse response, String path);
}
